<template>
  <div class="optimization">
    <Head title="为你优选"></Head>
    <van-row class="list" :gutter="fontSize * 0.36">
      <van-col span="12" v-for="(shop, i) in 10" :key="i">
        <Wares :s="shop.product"></Wares>
      </van-col>
      <van-col span="12" v-if="shopList.length % 2 != 0"></van-col>
    </van-row>
  </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  props: {
    shopList: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  computed: {
    ...mapState(["fontSize"]),
  },
};
</script>

<style lang='less' scoped>
.optimization {
  padding: 0.8rem 0.48rem 0.4rem;
  background: rgba(247, 246, 250, 1);

  .head {
    padding-bottom: 0.16rem;
  }

  .list {
    > div {
      margin-top: 0.4rem;
    }
  }
}
</style>
